package com.ybb.vue.controller;

import com.ybb.vue.common.Result;
import com.ybb.vue.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.AntPathMatcher;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * @author ybb
 * @version 1.0
 * @Description 首页controller
 * @Date 2023/2/21 15:29
 */

@RestController
@RequestMapping("/index")
public class IndexController {

    @Autowired
    private IndexService indexService;

    @GetMapping("/userToals")
    public Result<?> userToals() {
        Integer userToals = indexService.UserToals();
        return Result.success(userToals);
    }

    @GetMapping("/residentToals")
    public Result<?> residentToals() {
        Integer residentToals = indexService.ResidentToals();
        return Result.success(residentToals);
    }

}